<template>
  <div>
    <p>电站详情</p>
    <!-- 可用popup弹出层 -->
    <p @click="energyProject">苏州能源项目</p>
    <hips-popup v-model="show" position="top" :overlay="false">内容</hips-popup>
    <div class="grid-container">
      <div class="box">
        <div class="box-content">
          <img src="../assets/moneyimage.png" alt="图片" class="box-image" />
          <div class="box-text">
            <p>充电</p>
            <p>状态</p>
          </div>
        </div>
      </div>
      <div class="box">
        <div class="box">
          <div class="box-content">
            <img src="../assets/moneyimage.png" alt="图片" class="box-image" />
            <div class="box-text">
              <p>81%</p>
              <p>转换效率</p>
            </div>
          </div>
        </div>
      </div>
      <div class="box">
        <div class="box">
          <div class="box-content">
            <img src="../assets/moneyimage.png" alt="图片" class="box-image" />
            <div class="box-text">
              <p>77.5%</p>
              <p>soc</p>
            </div>
          </div>
        </div>
      </div>
      <div class="box">
        <div class="box">
          <div class="box-content">
            <img src="../assets/moneyimage.png" alt="图片" class="box-image" />
            <div class="box-text">
              <p>98.0%</p>
              <p>SOH</p>
            </div>
          </div>
        </div>
      </div>
      <div class="boxText">
        <p>苏州能源</p>
        <p style="margin-left: 10px">离线</p>
      </div>
      <div class="boxText">
        <p>苏州能源</p>
        <p style="margin-left: 10px">离线</p>
      </div>
    </div>
  </div>
</template>

<script>
import { Popup } from "@hips/vue-ui";
export default {
  components: {
    [Popup.name]: Popup,
  },
  data() {
    return {};
  },

  methods: {
    energyProject() {},
  },
};
</script>

<style>
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.grid-container .box {
  height: 100px;
  background-color: #191e37;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 8px;
  box-sizing: border-box;
}
.boxText {
  height: 100px;
  background-color: #191e37;
  color: white;
  border-radius: 8px;
  box-sizing: border-box;
}
.box-content {
  display: flex;
  align-items: center;
  width: 100%;
}
.box-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  margin-right: 10px;
}
.box-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.box-text p {
  margin: 0;
}
</style>
